﻿using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using Kobets.Automation.Chimera.Common;

namespace Kobets.Automation.Chimera.Controller
{
    [RunInstaller(true)]
    public partial class ProjectInstaller : Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
        }

        protected override void OnCommitted(IDictionary savedState)
        {
            base.OnCommitted(savedState);
            // set service as Desktop Interactive
            CommonMethods.SetServiceInteractive(serviceInstaller1.ServiceName);
            // set service to restart after fault
            CommonMethods.SetRecoveryOptions(serviceInstaller1.ServiceName);
            CommonMethods.StartService(serviceInstaller1.ServiceName);
        }
    }
}
